package com.chixing.service;

import com.chixing.commons.ServerResponse;
import com.chixing.pojo.CompanyDetail;
import com.chixing.pojo.EsJobCompany;
import com.chixing.pojo.JobDetail;
import com.chixing.pojo.JobDetailVo;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * <p>
 * 职位详情表 服务类
 * </p>
 *
 * @author Jason Marslyon
 * @since 2022-10-04
 */
public interface IJobDetailService {
    public ServerResponse selectJob(int jobId);
    public ServerResponse selectAllJob(Integer pageNum,String companyIndustry,String jobDegree,String salary,String jingyan,String companyScale);
    public ServerResponse getJobDetail(int jobId);
    public ServerResponse selectAllJobs(Integer pageNum);
    public ServerResponse getJobTotal(String companyIndustry,String jobDegree,String salary,String jingyan,String companyScale);
    public ServerResponse getJobTotals();
    public  List<EsJobCompany> getJobCompany();
    //模糊搜索的总条数
    public ServerResponse selectConfuseNum(String kw);
    //模糊搜索
    public ServerResponse selectConfuseJob(String kw,Integer pageNum);
//    //通过查看的职位id查到EsjobCompany对象返回到前端
//    public ServerResponse saveToCookie(Integer jobId, HttpServletRequest request, HttpServletResponse response);

    //查询job
    public JobDetail getJob(Integer id);
    //查询公司
    public CompanyDetail getCompany(Integer id);


    //随机取5个职位
    public ServerResponse getNumJob(int size);




/*    //根据创建日期排序,截取前九条
    public List<JobDetail> getHotDiscountJob();*/

    public ServerResponse getJobAndCompany();

    //后台模块
    List<JobDetail> selectAllByPage(JobDetailVo jobDetailVo, HttpSession httpSession);

    List<JobDetail> selectAllByPagePerson(JobDetailVo jobDetailVo, HttpSession httpSession);

    Boolean savaJob(JobDetail jobDetail);

    Boolean updateJob(JobDetail jobDetail);

    Boolean deleteJob(Integer id);


    JobDetail selectById(Integer id);

}
